package com.fire8.dolphin.service;

import org.jivesoftware.smack.packet.Presence;

import android.os.Message;

import com.fire8.dolphin.service.xmpp.EventTypes;
import com.fire8.dolphin.service.xmpp.MessageProcessHandler;

public class JaberMessenger {
	
	public static void sendBeAddFriendMsg(MessageProcessHandler handler, Presence presence) {
		Message msg = new Message();
		msg.what = EventTypes.BE_ADD_FRIEND;
		msg.obj = presence;
		handler.getHandler().sendMessage(msg);
	}
	
	
	public static void sendAddFriendRefusedMsg(MessageProcessHandler handler, Presence presence) {
		Message msg = new Message();
		msg.what = EventTypes.ADD_FRIEND_REFUSED;
		msg.obj = presence;
		handler.getHandler().sendMessage(msg);
	}
	
	public static void sendChatMsg(MessageProcessHandler handler, org.jivesoftware.smack.packet.Message message) {
		Message msg = new Message();
		msg.what = EventTypes.CHAT_MSG;
		msg.obj = message;
		handler.getHandler().sendMessage(msg);
	}
	
}
